home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / 422mods.zip / SWAMPGAS.422 < prev    next >
Text File  |  1993-04-08  |  7KB  |  199 lines

  1. Spinning Cursor Mod for 4.22, NO MESSING W/ THE USER LIST!
  2. Fancy Me Mad #1 @7706
  3. Sun Apr 04 23:41:27 1993
  4. Updated for 4.22 -- YES I MOD ON SUNDAYS!
  5. ┌────────────────────────────────────────────────────────────────────────────┐
  6. │Name      : SWAMPGAS.MOD                 Date    : March 9, 1993            │
  7. │Author    : Gemini, 1@9985, Chaos! BBS   Revision: 2.0 I suppose.           │
  8. │Difficulty: ████▒▒                       WWIV vsn: 4.20e, but should work on│
  9. │Desc      : Spinning Cursor for EVERY USER                almost any verson │
  10. └────────────────────────────────────────────────────────────────────────────┘
  11.           6/* YOU DO NOT HAVE TO MESS WITH YOUR USER LIST!! */0
  12. The Author is Gemini, 1@9985, I don't know which net, the origional mod didn't
  13. say, but that was the time of 4.20e, so I assume it's WWIVnet.  I have
  14. updated it for 4.22 (really easy, fix a type 'o', and changed it so that
  15. you do not have to edit your user list to get this thing to work (although
  16. you can if you really want to :)).
  17.  
  18. If you use this, please tell me about, I'd like to know!
  19.  
  20. Here's some ideas for some cursors:
  21.  
  22. "_,-,~,-"
  23. "∙,°,∙,." and I'm sure you can think of a load of 'em.
  24.  
  25. Disclaimer:  If it's my fault, I'm sorry.  If it's your fault, I'm sorry.
  26.              Either way, I'm pretty sorry.
  27.  
  28. Step 1: Back up your source code.  Make sure you can restore what you(or me)
  29.         screwed up.
  30.  
  31. Step 2: Load COM.C and search for "unsigned char getkey("
  32.  
  33. Make the following changes:
  34.  
  35. /*%%*/  unsigned char getkey(int do_spc_fx)
  36.  
  37. /*==*/  unsigned char ch;
  38. /*%%*/  int beepyet, i;
  39. /*==*/  long dd,tv,tv1;
  40.  
  41. /*==*/  beepyet = 0;
  42. /*==*/  timelastchar1=timer1();
  43. /*++*/  i=curatr;
  44.  
  45. Ok, go down to:
  46.  
  47. /*==*/   nl();
  48. /*==*/   hangup = 1;
  49. /*==*/  }
  50. /*==*/  checkhangup();
  51.  
  52. And then add right after that:
  53.  
  54. /*++*/  if (do_spc_fx==1) {
  55. /*++*/    if (thisuser.sysstatus & sysstatus_spincurser) {
  56. /*++*/      npr("1%c\x1b[1D",thisuser.callsign[1]);  //Change the colors to0
  57. /*++*/      npr("2%c\x1b[1D",thisuser.callsign[2]);  //whatever you want.0
  58. /*++*/      npr("3%c\x1b[1D",thisuser.callsign[3]);0
  59. /*++*/      npr("7%c\x1b[1D",thisuser.callsign[4]);0
  60. /*++*/      npr(" \x1b[1D");
  61. /*++*/      setc(i);
  62. /*++*/     }
  63. /*++*/   }
  64.  
  65. Step 3: Open VARDEC.H.
  66.  
  67. Add the line specified:
  68.  
  69. /*==*/ /* userrec.sysstatus */
  70. /*==*/ #define sysstatus_ansi 0x0001
  71. /*==*/ #define sysstatus_color 0x0002
  72. /*++*/ #define sysstatus_spincurser 0x0400
  73.  
  74. Step 5: Save COM.C
  75.  
  76. Step 6: Save VARDEC.H
  77.  
  78. Step 4: Open up DEFAULTS.C
  79.  
  80. Add this somewhere in the begining:
  81.  
  82. /*start block copy*/
  83. void change_spin(void)
  84. {
  85.   npr("Current spinning curser: %c,%c,%c,%c\r\n",
  86.        thisuser.callsign[1],thisuser.callsign[2],thisuser.callsign[3],
  87.        thisuser.callsign[4]);
  88.   npr("\r\n1Character 1 : ");0
  89.   thisuser.spin[1]=getkey(0);
  90.   outchr(thisuser.callsign[1]);
  91.   npr("\r\n2Character 2 : ");0
  92.   thisuser.spin[2]=getkey(0);
  93.   outchr(thisuser.callsign[2]);
  94.   npr("\r\n3Character 3 : ");0
  95.   thisuser.callsign[3]=getkey(0);
  96.   outchr(thisuser.spin[3]);
  97.   npr("\r\n7Character 4 : ");0
  98.   thisuser.callsign[4]=getkey(0);
  99.   outchr(thisuser.callsign[4]);
  100. }
  101. /*end block copy*/
  102.  
  103. Step 7: Still in DEFAULTS.CSearch and add these lines:
  104.  
  105. /*++*/  npr("S. Spinning Cursor   : %s\r\n", /*You can use a get_string thing i
  106. f you like */
  107. /*++*/    (thisuser.sysstatus & sysstatus_spincurser)?"On":"Off");
  108. /*==*/  outstr(get_string(401));
  109. /*==*/  if (thisuser.wwiv_regnum)
  110. /*==*/    npr("%ld\r\n",thisuser.wwiv_regnum);
  111. /*==*/  else
  112. /*==*/    pl(get_string(402));
  113. /*==*/  pl(get_string(403));
  114.  
  115. Step 8: STILL in DEFAULTS.C search for:
  116.  
  117.  
  118. /*==*/    if (okansi()) {
  119. /*==*/    if (thisuser.sysstatus & sysstatus_spincurser) {
  120. /*%%*/    prt(2,"Defaults: (1-9,A-Z,?,Q) : ");
  121. /*%%*/    ch=onek("Q?123456789ABCSW"); /* <--- Add S */
  122. /*==*/      } else {
  123. /*%%*/      prt(2,"Defaults: (1-9,A-Z,?,Q) : ");
  124. /*%%*/      ch=onek("Q?123456789ABCSW"); /* <--- Add S */
  125.  
  126. Step 9: Cloase and save DEFAULTS.C
  127.  
  128. Step 10: Open DEFAULTS.C and add this case:
  129.  
  130.       case 'B':
  131.     if (thisuser.sysstatus & sysstatus_spincurser)
  132.       thisuser.sysstatus ^= sysstatus_spincurser;
  133.     nl();
  134.     prt(5,"Use Spinning Cursor? ");
  135.     if (yn()) {
  136.       thisuser.sysstatus |= sysstatus_spincurser;
  137.     change_spin();
  138.     }
  139.     break;
  140.  
  141. Step 10-20: Ok, done there.  Now, here is the fun part.  You have to go
  142. through all of the files that have getkey() in them, and replace that with
  143. either getkey(1) to use spinning cursor, or getkey(0) to not use it..
  144. Do whatever you want here.  This is a list of files where getkey() is
  145. called:
  146.  
  147. BBS.C
  148. BBSUTL.C
  149. COM.C
  150. CONIO.C
  151. EXTRN.C
  152. UTILITY.C
  153. UEDIT.C
  154. DIREDIT.C
  155. DEFAULTS.C
  156.  
  157. You might have other mods that use the getkey() function, you have to change
  158. those too. getkey() only shows up every now and then.  The mod is finished.
  159.  
  160. /* NOTE */ You must compile your source code for this to work.
  161.  
  162. /* NOTE */ I have used the callsign in this mod.  So if you use the callsign
  163. for some reason, or just like to have it there (I know that I don't use it,
  164. and many other sysops donm't either, so I thought that it would work okay)
  165. then either don't install this mod, or find something else to use.  You
  166. could use the last parts of the real names if you were REALLY desperate...
  167. Like have the line say: thisuser.realname[21], and then use
  168. thisuser.realname[20] for the second one etc... untill you use up characters.
  169. If you don't have any voting questions, then you can probably take it from
  170.       votes[20],      /* user's votes */
  171. that line... and just say thisuser.votes[17], thisuser.votes[18].. .etc...
  172. So you have a lot of options.  Now, this may not work, because the original
  173. mod wanted me to add a spin[4] somewhere in there, so I just took it from
  174. the callsign... but you might even be able to take it from the
  175.       res_gp[100];    /* reserved for whatever */
  176. line.  But I could be totaly wrong, hey, maybe that's what I should have
  177. tried to do, instead of using the callsign.  But at any rate, do whatever
  178. you want.  If you have no idea what I am talking about, then you haven't
  179. modded WWIV very long because the day I got my registration number in the
  180. mail, I knew NOTHING about C... and I still know nothing about C, but I've
  181. learned a lot.  But anyways, basicly what I am trying to say is:  If you
  182. don't know what you are doing, then if you install this mod, you will
  183. not be able to have users use the callsign.  If you know what I am talking
  184. about, then you can change it around so that you do not have to use the
  185. callsign.  And if you STILL don't know what I am talking about, I don't
  186. blame you, I often don't know what I am talking about.
  187.  
  188. /* BTW */ This is my first mod ever, and it's really not mine, I am just
  189. re-putting it out because I haven't seen one out there and I think it's
  190. really really really neat.  I tested it, and it works -- Locally.  Haven't
  191. tried with a user on line, but there shouldn't be a problem.
  192.  
  193. You can E-mail me, 1@7706 IceNET, or SWAMP GAS @7711 WWIVnet (I don't know
  194. my number there).
  195.  
  196. From the guy who doesn't know what he just did, but did it anyways--
  197.  
  198.         1-3Swamp Gas0
  199.